package com.mlk.engSystem.controller;

import com.mlk.core.component.page.Pager;
import com.mlk.core.util.ServerResponse;
import com.mlk.engSystem.service.EngSysParamService;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author xulu
 * 系统参数设置
 */
@Controller
@RequestMapping("/eng/sys/systemParam")
public class EngSysParamController {

    @Resource
    private EngSysParamService engSysParamService;

    /**
     * 返回首页
     * @return
     */
    @RequestMapping("index")
    public String index(){
        return "engSystem/systemParam";
    }

    /**
     * 分页数据展示
     * @return
     */
    @ResponseBody
    @RequestMapping("listPage")
    public Pager list(){
        return this.engSysParamService.listPage();
    }

    /**
     * 更新数据值
     * @return
     */
    @ResponseBody
    @RequestMapping("update")
    public ServerResponse update(Integer id , String value){
        return this.engSysParamService.update(id,value);
    }


}
